// Copyright (C) 2011 nitsuja and contributors
// Copyright (C) 2013 Hourglass-Resurrection team
// Hourglass-Resurrection is licensed under GPL v3.
// Full notice is in COPYING.txt.

#ifndef GDITRAMPS_H_INCL
#define GDITRAMPS_H_INCL

#define StretchBlt TrampStretchBlt
TRAMPFUNC BOOL WINAPI StretchBlt(HDC hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, HDC hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, DWORD dwRop) TRAMPOLINE_DEF
#define BitBlt TrampBitBlt
TRAMPFUNC BOOL WINAPI BitBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HDC hdcSrc, int nXSrc, int nYSrc, DWORD dwRop) TRAMPOLINE_DEF
#define PatBlt TrampPatBlt
TRAMPFUNC BOOL WINAPI PatBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, DWORD dwRop) TRAMPOLINE_DEF
#define MaskBlt TrampMaskBlt
TRAMPFUNC BOOL WINAPI MaskBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HDC hdcSrc, int nXSrc, int nYSrc, HBITMAP hbmMask, int xMask, int yMask, DWORD dwRop) TRAMPOLINE_DEF
#define SwapBuffers TrampSwapBuffers
TRAMPFUNC BOOL SwapBuffers(HDC hdc) TRAMPOLINE_DEF
#define SetDIBitsToDevice TrampSetDIBitsToDevice
TRAMPFUNC int WINAPI SetDIBitsToDevice(HDC hdc, int XDest, int YDest, DWORD dwWidth, DWORD dwHeight, int XSrc, int YSrc, UINT uStartScan, UINT cScanLines, const VOID *lpvBits, const BITMAPINFO *lpbmi, UINT fuColorUse) TRAMPOLINE_DEF
#define StretchDIBits TrampStretchDIBits
TRAMPFUNC int WINAPI StretchDIBits(HDC hdc, int XDest, int YDest, int nDestWidth, int nDestHeight, int XSrc, int YSrc, int nSrcWidth, int nSrcHeight, const VOID *lpBits, const BITMAPINFO *lpbmi, UINT iUsage, DWORD dwRop) TRAMPOLINE_DEF

#define CreateDCA TrampCreateDCA
TRAMPFUNC HDC WINAPI CreateDCA(LPCSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszOutput, const DEVMODEA *lpInitData) TRAMPOLINE_DEF
#define CreateDCW TrampCreateDCW
TRAMPFUNC HDC WINAPI CreateDCW(LPWSTR lpszDriver, LPWSTR lpszDevice, LPWSTR lpszOutput, const DEVMODEW *lpInitData) TRAMPOLINE_DEF
#define GetDC TrampGetDC
TRAMPFUNC HDC WINAPI GetDC(HWND hWnd) TRAMPOLINE_DEF
#define GetDCEx TrampGetDCEx
TRAMPFUNC HDC WINAPI GetDCEx(HWND hWnd, HRGN hrgnClip, DWORD flags) TRAMPOLINE_DEF
#define GetWindowDC TrampGetWindowDC
TRAMPFUNC HDC WINAPI GetWindowDC(HWND hWnd) TRAMPOLINE_DEF
#define ReleaseDC TrampReleaseDC
TRAMPFUNC int WINAPI ReleaseDC(HWND hWnd, HDC hDC) TRAMPOLINE_DEF
#define SelectPalette TrampSelectPalette
TRAMPFUNC HPALETTE WINAPI SelectPalette(HDC hdc, HPALETTE hpal, BOOL bForceBackground) TRAMPOLINE_DEF
#define RealizePalette TrampRealizePalette
TRAMPFUNC UINT WINAPI RealizePalette(HDC hdc) TRAMPOLINE_DEF
#define GetSystemPaletteEntries TrampGetSystemPaletteEntries
TRAMPFUNC UINT WINAPI GetSystemPaletteEntries(HDC hdc, UINT iStartIndex, UINT nEntries, LPPALETTEENTRY lppe) TRAMPOLINE_DEF

#define ChoosePixelFormat TrampChoosePixelFormat
TRAMPFUNC int WINAPI ChoosePixelFormat(HDC hdc, CONST PIXELFORMATDESCRIPTOR* pfd) TRAMPOLINE_DEF
#define SetPixelFormat TrampSetPixelFormat
TRAMPFUNC BOOL WINAPI SetPixelFormat(HDC hdc, int format, CONST PIXELFORMATDESCRIPTOR * pfd) TRAMPOLINE_DEF
#define GetPixel TrampGetPixel
TRAMPFUNC COLORREF WINAPI GetPixel(HDC hdc, int xx, int yy) TRAMPOLINE_DEF
#define GetDeviceCaps TrampGetDeviceCaps
TRAMPFUNC int WINAPI GetDeviceCaps(HDC hdc, int index) TRAMPOLINE_DEF

#define BeginPaint TrampBeginPaint
TRAMPFUNC HDC WINAPI BeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint) TRAMPOLINE_DEF
#define EndPaint TrampEndPaint
TRAMPFUNC BOOL WINAPI EndPaint(HWND hwnd, const PAINTSTRUCT *lpPaint) TRAMPOLINE_DEF
#define FillRect TrampFillRect
TRAMPFUNC int WINAPI FillRect(HDC hDC, const RECT *lprc, HBRUSH hbr) TRAMPOLINE_DEF
#define FrameRect TrampFrameRect
TRAMPFUNC int WINAPI FrameRect(HDC hDC, const RECT *lprc, HBRUSH hbr) TRAMPOLINE_DEF
#define Rectangle TrampRectangle
TRAMPFUNC BOOL WINAPI Rectangle(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) TRAMPOLINE_DEF
#define Polyline TrampPolyline
TRAMPFUNC BOOL WINAPI Polyline(HDC hdc, const POINT *lppt, int cPoints) TRAMPOLINE_DEF
#define LineTo TrampLineTo
TRAMPFUNC BOOL WINAPI LineTo(HDC hdc, int nXEnd, int nYEnd) TRAMPOLINE_DEF
#define ArcTo TrampArcTo
TRAMPFUNC BOOL WINAPI ArcTo(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2, int nYRadial2) TRAMPOLINE_DEF
#define MoveToEx TrampMoveToEx
TRAMPFUNC BOOL WINAPI MoveToEx(HDC hdc, int X, int Y, LPPOINT lpPoint) TRAMPOLINE_DEF
#define PolyDraw TrampPolyDraw
TRAMPFUNC BOOL WINAPI PolyDraw(HDC hdc, const POINT *lppt, const BYTE *lpbTypes, int cCount) TRAMPOLINE_DEF
#define PolylineTo TrampPolylineTo
TRAMPFUNC BOOL WINAPI PolylineTo(HDC hdc, const POINT *lppt, DWORD cCount) TRAMPOLINE_DEF
#define PolyBezierTo TrampPolyBezierTo
TRAMPFUNC BOOL WINAPI PolyBezierTo(HDC hdc, const POINT *lppt, DWORD cCount) TRAMPOLINE_DEF
#define Ellipse TrampEllipse
TRAMPFUNC BOOL WINAPI Ellipse(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) TRAMPOLINE_DEF
#define Polygon TrampPolygon
TRAMPFUNC BOOL WINAPI Polygon(HDC hdc, const POINT *lpPoints, int cCount) TRAMPOLINE_DEF
#define Arc TrampArc
TRAMPFUNC BOOL WINAPI Arc(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXStartArc, int nYStartArc, int nXEndArc, int nYEndArc) TRAMPOLINE_DEF
#define SetPixel TrampSetPixel
TRAMPFUNC COLORREF WINAPI SetPixel(HDC hdc, int X, int Y, COLORREF crColor) TRAMPOLINE_DEF

#define GetClipBox TrampGetClipBox
TRAMPFUNC int WINAPI GetClipBox(HDC hdc, LPRECT lprc) TRAMPOLINE_DEF
#define CreateEllipticRgn TrampCreateEllipticRgn
TRAMPFUNC HRGN WINAPI CreateEllipticRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) TRAMPOLINE_DEF
#define CreateEllipticRgnIndirect TrampCreateEllipticRgnIndirect
TRAMPFUNC HRGN WINAPI CreateEllipticRgnIndirect(const RECT *lprc) TRAMPOLINE_DEF
#define CreateRectRgn TrampCreateRectRgn
TRAMPFUNC HRGN WINAPI CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) TRAMPOLINE_DEF
#define CreateRectRgnIndirect TrampCreateRectRgnIndirect
TRAMPFUNC HRGN WINAPI CreateRectRgnIndirect(const RECT *lprc) TRAMPOLINE_DEF
#define CreatePolygonRgn TrampCreatePolygonRgn
TRAMPFUNC HRGN WINAPI CreatePolygonRgn(const POINT *lpPoints, int cPoints, int fnPolyFillMode) TRAMPOLINE_DEF

#define TextOutA TrampTextOutA
TRAMPFUNC BOOL WINAPI TextOutA(HDC hdc, int nXStart, int nYStart, LPCSTR lpString, int cchString) TRAMPOLINE_DEF
#define TextOutW TrampTextOutW
TRAMPFUNC BOOL WINAPI TextOutW(HDC hdc, int nXStart, int nYStart, LPWSTR lpString, int cchString) TRAMPOLINE_DEF
#define DrawTextA TrampDrawTextA
TRAMPFUNC int WINAPI MyDrawTextA(HDC hdc, LPCSTR lpchText, int nCount, LPRECT lpRect, UINT uFormat) TRAMPOLINE_DEF
#define DrawTextW TrampDrawTextW
TRAMPFUNC int WINAPI MyDrawTextW(HDC hdc, LPWSTR lpchText, int nCount, LPRECT lpRect, UINT uFormat) TRAMPOLINE_DEF
#define DrawTextExA TrampDrawTextExA
TRAMPFUNC int WINAPI DrawTextExA(HDC hdc, LPSTR lpchText, int nCount, LPRECT lpRect, UINT dwDTFormat, LPDRAWTEXTPARAMS lpDTParams) TRAMPOLINE_DEF
#define DrawTextExW TrampDrawTextExW
TRAMPFUNC int WINAPI DrawTextExW(HDC hdc, LPWSTR lpchText, int nCount, LPRECT lpRect, UINT dwDTFormat, LPDRAWTEXTPARAMS lpDTParams) TRAMPOLINE_DEF
#define SetTextColor TrampSetTextColor
TRAMPFUNC COLORREF WINAPI SetTextColor(HDC hdc, COLORREF crColor) TRAMPOLINE_DEF
#define SetBkColor TrampSetBkColor
TRAMPFUNC COLORREF WINAPI SetBkColor(HDC hdc, COLORREF crColor) TRAMPOLINE_DEF

#define CreateFontA TrampCreateFontA
TRAMPFUNC HFONT WINAPI CreateFontA(int nHeight, int nWidth, int nEscapement, int nOrientation, int fnWeight,
								DWORD fdwItalic, DWORD fdwUnderline, DWORD fdwStrikeOut, DWORD fdwCharSet,
								DWORD fdwOutputPrecision, DWORD fdwClipPrecision, DWORD fdwQuality,
								DWORD fdwPitchAndFamily, LPCSTR lpszFace)
#define CreateFontW TrampCreateFontW
TRAMPFUNC HFONT WINAPI CreateFontW(int nHeight, int nWidth, int nEscapement, int nOrientation, int fnWeight,
								DWORD fdwItalic, DWORD fdwUnderline, DWORD fdwStrikeOut, DWORD fdwCharSet,
								DWORD fdwOutputPrecision, DWORD fdwClipPrecision, DWORD fdwQuality,
								DWORD fdwPitchAndFamily, LPWSTR lpszFace) TRAMPOLINE_DEF
#define CreateFontIndirectA TrampCreateFontIndirectA
TRAMPFUNC HFONT WINAPI CreateFontIndirectA(CONST LOGFONTA *lplf) TRAMPOLINE_DEF
#define CreateFontIndirectW TrampCreateFontIndirectW
TRAMPFUNC HFONT WINAPI CreateFontIndirectW(CONST LOGFONTW *lplf) TRAMPOLINE_DEF

#define SetViewportOrgEx TrampSetViewportOrgEx
TRAMPFUNC BOOL WINAPI SetViewportOrgEx(HDC hdc, int X, int Y, LPPOINT lpPoint) TRAMPOLINE_DEF
#define SetViewportExtEx TrampSetViewportExtEx
TRAMPFUNC BOOL WINAPI SetViewportExtEx(HDC hdc, int nXExtent, int nYExtent, LPSIZE lpSize) TRAMPOLINE_DEF
#define GetViewportOrgEx TrampGetViewportOrgEx
TRAMPFUNC BOOL WINAPI GetViewportOrgEx(HDC hdc, LPPOINT lpPoint) TRAMPOLINE_DEF
#define GetWindowOrgEx TrampGetWindowOrgEx
TRAMPFUNC BOOL WINAPI GetWindowOrgEx(HDC hdc, LPPOINT lpPoint) TRAMPOLINE_DEF
#define SetWindowOrgEx TrampSetWindowOrgEx
TRAMPFUNC BOOL WINAPI SetWindowOrgEx(HDC hdc, int X, int Y, LPPOINT lpPoint) TRAMPOLINE_DEF
#define GetCurrentPositionEx TrampGetCurrentPositionEx
TRAMPFUNC BOOL WINAPI GetCurrentPositionEx(HDC hdc, LPPOINT lpPoint) TRAMPOLINE_DEF
// Not technically GDI but as video-related win32 functions they're close enough.
#define ChangeDisplaySettingsA TrampChangeDisplaySettingsA
TRAMPFUNC LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags) TRAMPOLINE_DEF
#define ChangeDisplaySettingsW TrampChangeDisplaySettingsW
TRAMPFUNC LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW lpDevMode, DWORD dwFlags) TRAMPOLINE_DEF
#define ChangeDisplaySettingsExA TrampChangeDisplaySettingsExA
TRAMPFUNC LONG WINAPI ChangeDisplaySettingsExA(LPCSTR lpszDeviceName, LPDEVMODEA lpDevMode, HWND hwnd, DWORD dwFlags, LPVOID lParam) TRAMPOLINE_DEF
#define ChangeDisplaySettingsExW TrampChangeDisplaySettingsExW
TRAMPFUNC LONG WINAPI ChangeDisplaySettingsExW(LPWSTR lpszDeviceName, LPDEVMODEW lpDevMode, HWND hwnd, DWORD dwFlags, LPVOID lParam) TRAMPOLINE_DEF

#define mciSendCommand TrampmciSendCommand
TRAMPFUNC MCIERROR WINAPI mciSendCommand(MCIDEVICEID IDDevice, UINT uMsg, DWORD_PTR fwdCommand, DWORD_PTR dwParam) TRAMPOLINE_DEF

#endif
